<template>
  <div class="view">
    <div class="cu-list grid col-3">
      <div class="cu-item" v-for="item in option" :key="item.title" @click="onClick(item.title)">
        <text :class="item.icon"></text>
        <text style="color: #666666">{{item.title}}</text>
      </div>
    </div>
  </div>
</template>

<script>
export default {
    name: "Menu",
  data(){
      return{
        option:[
            {
              title:"收款记录",
              icon:"cuIcon-form lg text-green"
            },
          {
            title:"经营分析",
            icon:"cuIcon-rank lg text-green"
          },
          {
            title:"员工管理",
            icon:"cuIcon-friend lg text-green"
          },
            {
                title:"门店信息",
                icon:"cuIcon-shop lg text-green"
            }
        ]
      }
  },
  methods:{
    onClick:function (title) {
      if (title==="收款记录"){
        uni.navigateTo({
          url:"/pages/collection/index"
        })
      }else if (title==="经营分析"){
        uni.navigateTo({
          url:"/pages/business/index"
        })
      }else if (title==="员工管理"){
        uni.navigateTo({
          url:"/pages/employee/index"
        })
      }else if(title==="门店信息"){
          uni.navigateTo({
              url:"/pages/store/index"
          })
      }
    },
  }
}
</script>

<style scoped>
.view{
  margin-top: 2%;
  background-color: white;
  height: 90%;
}

</style>